import request from '@/utils/request'

// 查询金额分账明细列表
export function listSubAmount(query) {
  return request({
    url: '/course/subAmount/list',
    method: 'get',
    params: query
  })
}
export function getTotal(query) {
  return request({
    url: '/course/subAmount/getTotal',
    method: 'get',
    params: query
  })
}


// 查询金额分账明细详细
export function getSubAmount(id) {
  return request({
    url: '/course/subAmount/view/' + id,
    method: 'get'
  })
}

// 新增金额分账明细
export function addSubAmount(data) {
  return request({
    url: '/course/subAmount/add',
    method: 'post',
    data: data
  })
}

// 修改金额分账明细
export function updateSubAmount(data) {
  return request({
    url: '/course/subAmount/update',
    method: 'put',
    data: data
  })
}

// 删除金额分账明细
export function delSubAmount(id) {
  return request({
    url: '/course/subAmount/delete/' + id,
    method: 'delete'
  })
}
